package com.kang.gaklibrary.service.impl;

import com.kang.gaklibrary.mapper.PlanMapper;
import com.kang.gaklibrary.model.Plan;
import com.kang.gaklibrary.service.PlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlanImpl implements PlanService {
    @Autowired
    PlanMapper planMapper;

    @Override
    public List<Plan> selectAllByQq(String qq) {
        return planMapper.selectAllByQq(qq);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return planMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(String planName, String qq) {
        Plan plan = new Plan();
        plan.setPlan(planName);
        plan.setQq(qq);
        System.out.println(plan.getPlan() + "..............................................................................");
        return planMapper.insertSelective(plan);
    }


}
